package interview;

import java.util.ArrayList;
import java.util.Arrays;

public class Toy {
    public void play() {
        System.out.print("play-");
    }

    public void finalizer() {
        System.out.print("clean-");
    }

    public static void main(String[] fun) {
//        Toy car = new Toy();
//        car.play();
//        System.gc();
//        Toy doll = new Toy();
//        doll.play();
        ArrayList<Object> objects = new ArrayList<>();
        int[] arr = new int[]{1, 2, 3, 4 ,5};
        int[] ints = Arrays.copyOf(arr, 4);
        System.out.println(Arrays.toString(ints));
    }
}